﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GraphTest.Geometry2D.Interfaces;

namespace GraphTest.Geometry2D
{
    public class Point2D : IPoint2D
    {
        public Point2D()
        {
            X = 0.0F;
            Y = 0.0F;
        }

        public Point2D(float x, float y)
        {
            X = x;
            Y = y;
        }

        public Point2D(IPoint2D p)
        {
            if (p == null)
                throw new ArgumentNullException("p");

            X = p.X;
            Y = p.Y;
        }

        public float X { get; set; }
        public float Y { get; set; }


        public Vector2D GetVector()
        {
            return new Vector2D(X, Y);
        }
    }
}
